package com.tsinghua.discharge.dao;

import com.tsinghua.discharge.model.RegionMapping;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RegionMappingMapper {
    int deleteByPrimaryKey(Integer regionMapId);

    int insert(RegionMapping record);

    int insertSelective(RegionMapping record);

    RegionMapping selectByPrimaryKey(Integer regionMapId);

    int updateByPrimaryKeySelective(RegionMapping record);

    int updateByPrimaryKey(RegionMapping record);

    int selectRegionId(@Param("region")String region, @Param("id")int user_id);

    int selectRepeat(RegionMapping record);

    int selectTHURegionId(@Param("region")String region, @Param("id")int user_id);

    int selectId(RegionMapping record);

    List<String> selectBulk(int userId);

    int selectByRegionName(@Param("regionName")String regionName,@Param("userId")int userId);

    List<Integer> selectAll(int userId);

    String IdToName(@Param("regionid")Integer regionid,@Param("userId")Integer userId);

    RegionMapping selectByMap(@Param("regionName")String regionName,@Param("userId")int userId);

    int deleteByUser(int userId);
}